package cn.wolfcode.luowowo.repository;

import cn.wolfcode.luowowo.domain.UserInfo;
import cn.wolfcode.luowowo.service.IUserInfoService;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserInfoRepository extends MongoRepository<UserInfo,String> {
    //根据号码去查询号码的唯一性
    UserInfo findByPhone(String phone);
    //根据用户输入的信息查询对象
    UserInfo findByPhoneAndPassword(String username, String password);
    
    /**
     * 通过目的地名称查询用户信息
     * @param name
     * @return
     */
    List<UserInfo> findByCity(String name);
    

}
